New topic: 

works in debug not in compile...

<http://forums.realsoftware.com/viewtopic.php?t=32188>

       Page 1 of 1
   [ 3 posts ]                 Previous topic | Next topic         Author  
Message       brianheibert           Post subject: works in debug not in 
compile...Posted: Mon Jan 25, 2010 10:00 pm                        
Joined: Sat Jan 23, 2010 3:03 pm
Posts: 2              Hi,
I got this code that brings up the keyboard viewer in the debug app
but when I go to compile my app, as I am almost finished with it (except for 
this problem)
I get This method requires more parameters than were passed
on this line:  sh.execute 
app.executablefile.parent.parent.child("Resources").child("keyboardviewer")

Is it because the unix executable file keyboardviewer isn't in my resources 
folder until after the application is compiled? If so ... how the heck do I 
compile my app and then put the executable file in my application's resources 
folder (in the app package)?

Here's the code...

Code:
dim appexe as folderitem

#if debugBuild then
  MSGBOX "Not included in debugBuild"
#else
  dim sh as shell
  dim s as string
  sh = new shell
  sh.execute 
app.executablefile.parent.parent.child("Resources").child("keyboardviewer")
  if not appexe.exists then
  msgbox """keyboardViewer"" not found"
  else
  sh = new shell
  sh.execute appexe.shellpath
  s=sh.result
  #endif
  
   
                            Top                paulg           Post subject: 
Re: works in debug not in compile...Posted: Mon Jan 25, 2010 11:03 pm           
             
Joined: Thu Oct 05, 2006 11:45 pm
Posts: 599
Location: Planet Earth:North America:California              brianheibert 
wrote:Is it because the unix executable file keyboardviewer isn't in my 
resources folder until after the application is compiled? If so ... how the 
heck do I compile my app and then put the executable file in my application's 
resources folder (in the app package)?


Umm how about you copy it into the app bundle?  As in right click on the app, 
choose "Show Package Contents" then drag (or copy and paste) your other app 
into the correct location inside the bundle.  I am not sure what keyboardviewer 
is though. 

Hey, another month another forum user name, alright.  Well at least it is your 
name.  I am sure that is not going to change, like your domain names.      
_________________
This message made with 100% recycled pixels.
MacBook CD2.0/2GB/OSX 10.6.2 / RB Pro 2009 R5.1  
                            Top               timhare           Post subject: 
Re: works in debug not in compile...Posted: Mon Jan 25, 2010 11:05 pm           
             
Joined: Fri Jan 06, 2006 3:21 pm
Posts: 7161
Location: Portland, OR  USA              Shell.Execute expects a string.  
You're giving it a FolderItem.  Maybe you need to use the ShellPath instead.

sh.Execute 
app.executablefile.parent.parent.child("Resources").child("keyboardviewer").ShellPath
   
                            Top           Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 3 posts ]     
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to