Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Optimized Compile Problem with Control

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-07-2009, 01:44 PM
Junior Member
 
Join Date: Sep 2008
Posts: 29
Default Optimized Compile Problem with Control

I have searched and read every thread that I can find involving the Control Keyword. It is probable that my problem is so simple that it's not come up.

In all the programs I have written, I have never had more than 1 Menu form, usually called fMenu and a FormLib Object called flMenu. Using these as Literals [ie. flMenu.New1("fMenu",B4PObject(1))] has always worked both in Debug and Optimized Compile.

In the attached snippet, I have 3 menus with FormLib Objects flMenu1, flMenu2, flMenu3. When compiling I get the error Unknown Control Type. Using: [ Control(fml, Form).New1(fm,B4PObject(1)) ] then Generates an Unknown Property error. Thinking that I could not use the Control Keyword when initializing (.New1), I took this out of the loop and initialized all three menus using the literal [fl.Menu3.New.....] and this compiled just fine but... when it got to "TextBox", I got a Control type error!
Using: [Control(fml, TextBox).SetFontStyle(names(i),True,False,False,Fa lse) generates Unknown Property error.

Can someone please help.

Regards,

Ed Sharp
Reply With Quote
  #2 (permalink)  
Old 02-07-2009, 02:39 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

The uploaded file is corrupt. Can you upload it again?
Reply With Quote
  #3 (permalink)  
Old 02-07-2009, 02:54 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Your attachment is not a valid sbp file but contains only a fragment of code. How about posting some proper source so we don't have to try to guess how to build your form and menus.

However
Quote:
Control(fml, TextBox).SetFontStyle(names(i),True,False,False,Fa lse) generates Unknown Property error.
It will! fml is, I assume, a FormLib not a Textbox - try

Control(fml, Formlib).SetFontStyle(names(i),True,False,False,Fa lse)
Reply With Quote
  #4 (permalink)  
Old 02-07-2009, 04:34 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Could this be related to not assigning teh main module prefix to the control keyword?
like...
Control(fml, TextBox)
should really be..
Control(main.fml, TextBox)
??
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #5 (permalink)  
Old 02-07-2009, 04:59 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by Cableguy View Post
Could this be related to not assigning teh main module prefix to the control keyword?
No. As I pointed out fml is not a TextBox, it is a Formlib. My suggestion works without needing a module prefix.
Reply With Quote
  #6 (permalink)  
Old 02-07-2009, 06:44 PM
Junior Member
 
Join Date: Sep 2008
Posts: 29
Default Agraham is correct

My apologies for only posting a code snippet and not the whole program. I have attached the whole program along with a functions .txt.

I did not realize that FormLib was a Control Type. As I mentioned in my original post, "something so simple..."

Thanks again to all for your help.

Regards

Ed Sharp

NB. The attached program DOES compile now!
Reply With Quote
  #7 (permalink)  
Old 02-09-2009, 05:08 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Quote:
Agraham is correct
Agraham is always correct
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change Control positions and sizes after compile. burd27 Questions (Windows Mobile) 16 04-21-2009 09:36 PM
Optimized Compilation problem on the device bob Questions (Windows Mobile) 4 03-12-2008 01:05 PM
Problem with Optimized Compiler mikemputer Questions (Windows Mobile) 3 01-26-2008 02:00 PM
Control.Visible problem in optimise compile agraham Bug Reports 1 01-14-2008 06:54 PM
Version 6.0 Device optimized compilation problem HarleyM Bug Reports 0 12-28-2007 02:01 AM


All times are GMT. The time now is 03:49 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0