Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Business Sample App Discussion
Started by DavidRangel Oct 08 2013 01:10 PM

- - - - -
110 replies to this topic
[TOPIC CONTROLS]
« Page 5 of 5 3 4 5
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#101

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,793 posts
  • Enterprise

No, those are not open source.

 

Rob



[TOPIC: post.html]
#102

davidhagen

[GLOBAL: userInfoPane.html]
davidhagen
  • Enthusiast

  • 47 posts
  • Corona SDK

Hi, I get this warning in the terminal. I think this has to do with spinner.

 

 WARNING: timer.resume( timerId ) ignored b/c timerId was not paused.



[TOPIC: post.html]
#103

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,793 posts
  • Enterprise

Is this causing an issue?

 

Rob



[TOPIC: post.html]
#104

davidhagen

[GLOBAL: userInfoPane.html]
davidhagen
  • Enthusiast

  • 47 posts
  • Corona SDK

No, it's not causing issue and not sure if anything will do on iOS.



[TOPIC: post.html]
#105

jospic

[GLOBAL: userInfoPane.html]
jospic
  • Enthusiast

  • 44 posts
  • Corona SDK

Hi,

I've tried Atom feed but there are some problems with parser. Cannot retrieve the effective entries...

Atom feed passed check well from remote validator:

http://validator.w3.org/feed

 

The rss version works well...

 

Of course I've replaced the correct "require" in the feed.lua file....

 

Is there any problem?

Thanks in advance

-j



[TOPIC: post.html]
#106

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,793 posts
  • Enterprise

I haven't tested the ATOM feed in a while.  It was working against Wordpress ATOM feeds a while back.  Are you getting errors?  What's in your console log?  What is the URL of the feed you're trying to use?



[TOPIC: post.html]
#107

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,793 posts
  • Enterprise

There are two things you need to do to make the atom feed work with the business app sample.  These will be included when I push the new version. 

 

But in the mean time, near the bottom of atom.lua change the line:

 

feed.entries = stories

 

to

 

feed.items = stories

 

Then in feed.lua and feed2.lua (its the same code in both)  around line 278, replace the pubDate code with:

 

    local timeStamp
    if atom then
        timeStamp = story.pubDate
    else
        timeStamp = string.match(story.pubDate,"%w+, %d+ %w+ %w+ %w+:%w+")
    end

 

This assumes that you have done a:

 

local atom = require( "atom" )

 

at the top.  The pubDate is in a format like:   yyyy-mm-ddTmm:dd:ssZ

 

but the RSS feed is more of a human readable format.  You may want to parse this and convert it to a prettier date format.

 

Rob



[TOPIC: post.html]
#108

jospic

[GLOBAL: userInfoPane.html]
jospic
  • Enthusiast

  • 44 posts
  • Corona SDK

Hi Rob,

thank you for reply.

I made the changes you suggested. Of course I had already changed the call to the file atom.lua (instead of rss.lua). 
But the error in my console is:
 
ERROR: Non-directory file already exists at (null)
 
The link that I'm testing is as follows:
 
In file main.lua I've inserted:
 
feedName = "feed.atom",
feedURL = "http://www.krimissa.com/data/_addondata/d5nufsh/",

Thanks in advance.

Regards.

-j



[TOPIC: post.html]
#109

iz2140

[GLOBAL: userInfoPane.html]
iz2140
  • Observer

  • 9 posts
  • Corona SDK

Hey Rob, 

 

I'm trying to use your sample business app as an added functionality on top of my app. I'm trying to place the contents of your main.lua file into its own composer scene, but I'm having trouble keeping myApp.tabBar around and getting rid of it when transitioning to scene to scene and back to my main game screen. 

 

Here's my code: 

 

In main.lua:

_G.HQTab=display.newGroup()
_G.HQTab.x, _G.HQTab.y = _W,_H

local display_stage = display.getCurrentStage()
display_stage:insert( composer.stage )    
display_stage:insert( _G.HQTab ) 

In devMenu.lua (adapted from your main.lua):


local composer = require ( "composer" )
local widget = require( "widget" )
local json = require( "json" )
local myApp = require( "HQ.myapp" ) 
local sheetLoader = require("sheetLoader")

local scene = composer.newScene()


math.randomseed(os.time())



--
-- Load our fonts and define our styles
--

function scene:create( event )
	local sceneGroup = self.view
	
	 if (display.pixelHeight/display.pixelWidth) > 1.5 then
	    myApp.isTall = true
	end

	if display.contentWidth > 320 then
	    myApp.is_iPad = true
	end

	local tabBarBackgroundFile = "images/tabBarBg7.png"
	local tabBarLeft = "images/tabBar_tabSelectedLeft7.png"
	local tabBarMiddle = "images/tabBar_tabSelectedMiddle7.png"
	local tabBarRight = "images/tabBar_tabSelectedRight7.png"

	myApp.topBarBg = "images/topBarBg7.png"

	local iconInfo = {
	    width = 40,
	    height = 40,
	    numFrames = 20,
	    sheetContentWidth = 200,
	    sheetContentHeight = 160
	}

	myApp.icons = graphics.newImageSheet("images/ios7icons.png", iconInfo)

	if system.getInfo("platformName") == "Android" then
	    myApp.theme = "widget_theme_android"
	    myApp.font = "Droid Sans"
	    myApp.fontBold = "Droid Sans Bold"
	    myApp.fontItalic = "Droid Sans"
	    myApp.fontBoldItalic = "Droid Sans Bold"
	    myApp.topBarBg = "images/topBarBg7.png"

	else
	    myApp.theme = "widget_theme_ios7"
	    local coronaBuild = system.getInfo("build")
	    if tonumber(coronaBuild:sub(6,12)) < 1206 then
	        myApp.theme = "widget_theme_ios"
	    end
	    myApp.font = "HelveticaNeue-Light"
	    myApp.fontBold = "HelveticaNeue"
	    myApp.fontItalic = "HelveticaNeue-LightItalic"
	    myApp.fontBoldItalic = "Helvetica-BoldItalic"
	end
	widget.setTheme(myApp.theme)
	
	myApp.tabBar = {}

	function myApp.showScreen1()
	    myApp.tabBar:setSelected(1)
	    --composer.removeHidden()
	    composer.gotoScene("HQ.menu", {time=250, effect="crossFade"})
	    return true
	end

	function myApp.showScreen2(event)
	    myApp.tabBar:setSelected(2)
	    local options = {
	        feedName = "outcast.rss",
	        feedURL = "http://www.simplemachine.co/?cat=60&feed=rss2",
	        icons = "fixed",
	        displayMode = "webpage",
	        pageTitle = "The Outcast"
	    }
	    --composer.removeHidden()
	    composer.gotoScene("HQ.feed", {time=250, effect="crossFade", params = options})
	    return true
	end

	function myApp.showScreen3()
	    myApp.tabBar:setSelected(3)
	    --composer.removeHidden()
	    composer.gotoScene("HQ.photogallery", {time=250, effect="crossFade"})
	    return true
	end

	function myApp.showScreen4()
	    myApp.tabBar:setSelected(4)
	    local options = {
	        feedName = "video.rss",
	        feedURL = "http://gdata.youtube.com/feeds/mobile/playlists/PLUqsW7siiOQScFgxcIi-upYV7wAmsgWCL?max-results=20&alt=rss&orderby=published&format=1",
	        icons = "fixed",
	        displayMode = "videoviewer",
	        pageTitle = "The Outcast Videos"
	    }
	    --composer.removeHidden()
	    composer.gotoScene("HQ.feed2", {time=250, effect="crossFade", params = options})
	    return true
	end

	function myApp.showScreen5()
		print("Making the call to update...")
		local sheetArray = sheetLoader.new()

	    return true
	end


	
	local function closeMenu()
		print("YEEEEAHHAHAHAH")
		local function killNav()
			composer.gotoScene("scene1", "crossFade", 400)
			
			--
		end
		--myApp.tabBar:removeSelf()
		
		transition.to(myApp.tabBar, {time=300, transition=easing.inOutQuad, onComplete=killNav})
		return true
	end

	local tabButtons = {
	    {
	        label = "",
	        defaultFile = "images/tabbaricon_main.png",
	        overFile = "images/tabbaricon_main_down.png",
	        labelColor = { 
	            default = { 0.25, 0.25, 0.25 }, 
	            over = { 0.768, 0.516, 0.25 }
	        },
	        width = 32,
	        height = 32,
	        onPress = myApp.showScreen1,
	        selected = true,
	    },
	    {
	        label = "",
	        defaultFile = "images/tabbaricon_blog.png",
	        overFile = "images/tabbaricon_blog_down.png",
	        labelColor = { 
	            default = { 0.25, 0.25, 0.25 }, 
	            over = { 0.768, 0.516, 0.25 }
	        },
	        width = 32,
	        height = 32,
	        onPress = myApp.showScreen2,
	    },
	    {
	        label = "",
	        defaultFile = "images/tabbaricon_pic.png",
	        overFile = "images/tabbaricon_pic_down.png",
	        labelColor = { 
	            default = { 0.25, 0.25, 0.25 }, 
	            over = { 0.768, 0.516, 0.25 }
	        },
	        width = 32,
	        height = 32,
	        onPress = myApp.showScreen3,
	    },
	    {
	        label = "",
	        defaultFile = "images/tabbaricon_vid.png",
	        overFile = "images/tabbaricon_vid_down.png",
	        labelColor = { 
	            default = { 0.25, 0.25, 0.25 }, 
	            over = { 0.768, 0.516, 0.25 }
	        },
	        width = 32,
	        height = 32,
	        onPress = myApp.showScreen4,
	    },
	    {
	        label = "",
	        defaultFile = "images/tabbaricon_exit.png",
	        overFile = "images/tabbaricon_exit_down.png",
	        labelColor = { 
	            default = { 0.25, 0.25, 0.25 }, 
	            over = { 0.768, 0.516, 0.25 }
	        },
	        width = 32,
	        height = 32,
	        onPress = closeMenu,
	    },
	}

	myApp.tabBar = widget.newTabBar{
	    top = -50 + display.contentHeight/2,
	    left = 0,
	    width = display.contentWidth*2,
	    backgroundFile = tabBarBackgroundFile,
	    tabSelectedLeftFile = tabBarLeft,      -- New
	    tabSelectedRightFile = tabBarRight,    -- New
	    tabSelectedMiddleFile = tabBarMiddle,      -- New
	    tabSelectedFrameWidth = 20,                                         -- New
	    tabSelectedFrameHeight = 50,                                        -- New    
	    buttons = tabButtons,
	    height = 50,
	    background="images/tabBarBg7.png"
	}



	--
	-- now make the first tab active.align
	--

	--sceneGroup:insert(background)

	--sceneGroup:insert(myApp.tabBar)
	--sceneGroup:insert(background)
	_G.HQTab:insert(myApp.tabBar)

	

end

function scene:show( event )
	local sceneGroup = self.view
	myApp.showScreen1()
	

end



scene:addEventListener( "create", scene )
scene:addEventListener( "show", scene )

return scene


Any pointers on how to make this entirely composer-based? Thanks!



[TOPIC: post.html]
#110

wk-leung

[GLOBAL: userInfoPane.html]
wk-leung
  • Observer

  • 1 posts
  • Corona SDK

Dear All,

 

I am new to use Corona, when I download the Business -app sample and running in the simulator, a Warning message will be show:

 

"your project uses premium graphics feature(object.fill) available.............."

 

 

thus how can I fix it for using in starter simulator , please advise.

 

And I would like to ask is it possible to use corona to open a PDF file or word file in local mobile memory or by URL? please reply and let me know.

 

thanks & Regards,

 



[TOPIC: post.html]
#111

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,793 posts
  • Enterprise

Look in the widget-extras.lua file.  These four lines need changed:
 

widget-extras.lua:        background.fill = { type = "image", filename=opt.background}
widget-extras.lua:        background.fill = opt.backgroundColor
widget-extras.lua:            background.fill = {1,1,1}
widget-extras.lua:            background.fill = { type = "gradient", color1={0.5, 0.5, 0.5}, color2={0, 0, 0}}

 

You would have to change them to not use background.fill.

 

Rob




[topic_controls]
« Page 5 of 5 3 4 5
 
[/topic_controls]