Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Mon Nov 19, 2018 3:03 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: "Declare Function" statements: how to make public, hide, ...
PostPosted: Wed Jul 25, 2012 12:18 am 
Offline

Joined: Fri Oct 28, 2011 12:41 am
Posts: 11
Friends, I have a long list of "Declare Function" statements. Please suggest how to ...
a) make them global/public so that they only need to be specified once for all methods and events
b) move them to the bottom of the code so that they are not in the way
c) hide them so that I only see them when really needed

and editing RealBasic XML source code is doable ...

Thanks

_________________
Mike Linacre


Top
 Profile  
Reply with quote  
 Post subject: Re: "Declare Function" statements: how to make public, hide,
PostPosted: Wed Jul 25, 2012 12:29 am 
Offline
User avatar

Joined: Mon Apr 02, 2007 2:08 am
Posts: 1225
Location: San Francisco, CA, USA
From the Project menu, select Add->External Method. This will create a new external method (a declare) in the class or module you have open. Note that if you want the declare to be globally available you must put it in a module:

Image

_________________
Boredom Software


Top
 Profile  
Reply with quote  
 Post subject: Re: "Declare Function" statements: how to make public, hide,
PostPosted: Fri Jul 27, 2012 2:03 am 
Offline

Joined: Fri Oct 28, 2011 12:41 am
Posts: 11
Thank you, charonn0. Exactly what I need :-)

And now that I have seen the RealBasic XML for one "Soft Declare Function" External Method, all the many others can be inserted into the XML source code using the same XML format. (This also works for inserting long lists of constants.)

Just in case an example will help someone else:

soft declare function spssLowHighVal Lib "spssio32.dll" Alias "spssLowHighVal@8" (ByRef Lowest As Double, ByRef Highest As Double) as int32

becomes in RealBasic XML Source Code:

<ExternalMethod>
<ItemName>spssLowHighVal</ItemName>
<Compatibility></Compatibility>
<Visible>1</Visible>
<ItemSource>
<TextEncoding>134217984</TextEncoding>
<SourceLine>Soft Declare Function spssLowHighVal Lib "spssio32.dll" Alias "spssLowHighVal@8" (ByRef Lowest As Double, ByRef Highest As Double) As int32</SourceLine>
</ItemSource>
<TextEncoding>134217984</TextEncoding>
<AliasName>spssLowHighVal@8</AliasName>
<ItemFlags>0</ItemFlags>
<Shared>0</Shared>
<ItemParams>ByRef Lowest As Double, ByRef Highest As Double</ItemParams>
<ItemResult>int32</ItemResult>
<LibraryName>spssio32.dll</LibraryName>
<SoftLink>1</SoftLink>
</ExternalMethod>

_________________
Mike Linacre


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group