E Electrocutioner Member Licensed User Longtime User Jun 21, 2015 #1 even though I load the layout, I get "Object should first be initialized" error when it loads. layout was created with Designer. _______________________________________________________________________ Sub Activity_Create(FirstTime As Boolean) 'Do not forget to load the layout file created with the visual designer. For example: 'Activity.LoadLayout("Layout1") 'Set the previous stored state Activity.LoadLayout("6") StateManager.RestoreState(Activity, "addresses", 60) _______________________________________________________________________
even though I load the layout, I get "Object should first be initialized" error when it loads. layout was created with Designer. _______________________________________________________________________ Sub Activity_Create(FirstTime As Boolean) 'Do not forget to load the layout file created with the visual designer. For example: 'Activity.LoadLayout("Layout1") 'Set the previous stored state Activity.LoadLayout("6") StateManager.RestoreState(Activity, "addresses", 60) _______________________________________________________________________
giga Well-Known Member Licensed User Longtime User Jun 21, 2015 #2 I think your load layout here shows as comment. 'Activity.LoadLayout("Layout1") should be. (remove the quotation mark before Activity) Code: Copy Activity.LoadLayout("Layout1") Last edited: Jun 21, 2015 Upvote 0
I think your load layout here shows as comment. 'Activity.LoadLayout("Layout1") should be. (remove the quotation mark before Activity) Code: Copy Activity.LoadLayout("Layout1")
RandomCoder Well-Known Member Licensed User Longtime User Jun 21, 2015 #3 giga said: I think your load layout here shows as comment. 'Activity.LoadLayout("Layout1") should be. (remove the quotation mark before Activity) Code: Copy Activity.LoadLayout("Layout1") Click to expand... That is just the usual example, the actual LoadLayout is done a couple of lines below where he loads layout "6". I suspect that the problem will be with StateManager.RestoreState but I've never used this and so not in a position to offer reliable advice. Upvote 0
giga said: I think your load layout here shows as comment. 'Activity.LoadLayout("Layout1") should be. (remove the quotation mark before Activity) Code: Copy Activity.LoadLayout("Layout1") Click to expand... That is just the usual example, the actual LoadLayout is done a couple of lines below where he loads layout "6". I suspect that the problem will be with StateManager.RestoreState but I've never used this and so not in a position to offer reliable advice.
giga Well-Known Member Licensed User Longtime User Jun 21, 2015 #4 Thanks @RandomCoder. I caught that after I typed it. Upvote 0