Tim & Yannick,

Thanks for your responses.

You both suggested the same initial solution:

1.      In the ObjectInfo function, change 'selection.obj' to simply 'obj'
2.      Wrap the entire ObjectInfo function into a Str$() function like
this:
Str$(ObjectInfo(obj, OBJ_INFO_TEXTSTRING)) = Text

Which I have already tried only to get the error:

ObjectInfo: argument 2 out of range.


Yannick,

You went on to suggest the following:

If you want to include a variable in the condition, you have to use Run
Command. If not, the condition will be tested on text itself and not the
content of text. So, here's another look at the command.

****************************************************************************
Dim     select_cmd,
LayoutTab,
Text             as String

LayoutTab = WindowInfo(FrontWindow(), WIN_INFO_TABLE)
Text = "Akolele"
Select_cmd = "Select * from "+LayoutTab+" Where Str$(ObjectInfo(obj,
OBJ_INFO_TEXTSTRING))="+TEXT
Run Command select_cmd
Delete from selection



I tried this and received the error:

File #0 not registered for access.
Found [] while searching for [A string constant].


I also tried to replace the variable with the actual text in the variable
ie.

..... _TEXTSTRING)) = Akolele"

For this one I receive the error:

File #0 not registered for access.
Variable or Field OBJ_INFO_TEXTSTRING not defined.

I have Included mapbasic.def at the start of the program.

Any further suggestions ideas would be greatly appreciated.

Thanks again for your help so far.

Scott
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> 
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to