gettingstarted
[Top] [All Lists]

Re: ToolsSelectionTool issue

To: "Getting Started" <gettingstarted at lists dot realsoftware dot com>
Subject: Re: ToolsSelectionTool issue
From: "Joseph J. Strout" <joe at realsoftware dot com>
Date: Fri, 19 Dec 2003 15:26:20 -0600
References: <BAY8-F18QHd8O0ymyvL0004e3c8 at hotmail dot com>
At 3:14 PM -0600 12/19/03, Chris Davis wrote:

I've been reading a book called Beginning Mac Programming. I was doing quite well working through the tutorials, but then I ran into a problem that I can't figure out. This is the code the book told me to type:
ToolsSelectionTool.Checked = ((nCurrentTool = 8) or (nCurrentTool = 9))

What is ToolsSelectionTool, exactly?

When I attempt to run the program it goes to this line and says "This method requires more parameters than were passed".

Hmm, it doesn't look to me like you're calling any method, unless maybe Checked is a method that takes some sort of index. It'd help if we knew what ToolsSelectionTool was (I don't have that book so I can't see for myself).

Now when I worked back to the ToolsSelectionTool menu handler the book shows the code for this menu handler starts off like this:

Function Action As Boolean

but mine starts off like this:

Function Action(Index As Integer) As Boolean

Can anyone please help me?

Ah! So it's part of a menu item array, I guess. In that case, ToolsSelectionTool itself is what needs a parameter. Your line should look something like:

  ToolsSelectionTool(0).Checked = ((nCurrentTool = 8) or (nCurrentTool = 9))

which will check and uncheck the first item of the array. Perhaps some other value makes more sense given the context; I leave that up to you.

Good luck,
- Joe

--
,------------------------------------------------------------------.
|    Joseph J. Strout           REAL Software, Inc.                |
|    joe at realsoftware dot com       http://www.realsoftware.com        |
`------------------------------------------------------------------'

- - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>
  • [no subject], Chris Davis
    • Re:, Charles Yeomans
    • Re: ToolsSelectionTool issue, Joseph J. Strout <=