Lots of beginner questions

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Oct 21 10:20:22 CDT 2003


on 10/21/03 5:45, chuck hinkle at chuckbo at hinkles.us wrote:

> What exactly happens when someone double-clicks on a database that has the
> creator set and opens a RB application to run?

Hmm. You ask us how works MacOS ?  :-)

Do you have some .html file?
What icon it have? I think icon of IE or Safary, yes?

What happens when you double clink this html file in Finder?
Finder find corresponded app and run it and open file in that app.

How Finder is able to do this?
Because each file in MAC OS have TYPE and CREATOR codes.
HTML file have CREATOR code the same to browser.

MacOS have database of all applications installed on HDD and their CREATOR
codes.

Since you develop YOUR APP, you will need assign to it your own creator
code. For example for VAPP I use 'VAPP'

And as I have told, you can assign db.Creator = 'CCCC' code,
It must be the same as code of your app.

You can assign code of your app in RB's dialog "App Settings"


> Let's say that I have an application with a Class type of myDatabase in it,
> and myDatabase has several base objects defined as properties, and so on.

ok

> Let's say that all of that has been set up without problem. myDatabase has
> Vdatabase as its superclass.

great

> In the app.open, I'll put the
> 
>   db = new myDatabase
> 
> to instantiate all of the database objects. Right?

yes

> Then, it seems that I want to do a
> 
>   db.open(filepathname)


Yes!

> where filepathname is the path and name of the file that I double-clicked
> on. Is that right?

I'd say this is folderItem.

Most probably REALbasic self in some way workout this issue.
Most probably class App have some event that catch Open file event.

I don't know how to call from that event YOUR open function.
You need read docs of RB, but I think this must be automatically enough.

In all my examples I have use Open dialog to open files.
Never have try what you ask about...
But you ask about REALbasic issue.

> (BTW, can someone please share the command that will
> return the name of the file that was opened -- not the name of the
> application running?)

    db.FullPath
    db.Name


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list