How to find where an object is on a form, from an object

Keisuke Miyako (4/25/14 11:28AM)


Keisuke Miyako (4/25/14 11:28 AM)

method

just as an idea:

you could create a method (can be a component, as long as it is shared)
like this:

C_TEXT($1;$code)

$methodPath:=$1

ARRAY LONGINT($pos;0)
ARRAY LONGINT($len;0)

Case of
: (Match regex("^\\[projectForm\\]\\/([^/]+)";$methodPath;1;$pos;$len))

$code:="//projectForm:
"+"\""+Substring($methodPath;$pos{1};$len{1})+"\""

: (Match
regex("^\\[tableForm\\]\\/([^/]+)\\/([^/]+)";$methodPath;1;$pos;$len))

$code:="//tableForm:

["+Substring($methodPath;$pos{1};$len{1})+"];\""+Substring($methodPath;$po
s
{2};$len{2})+"\""

End case

If (Length($code)#0)
SET TEXT TO PASTEBOARD($code)
End if

and a macro xml file like this (in "Macros v2?=A2?=82=C2ù
folder next to the
structure file or component)

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE macros SYSTEM "http://www.4d.com/dtd/2007/macros.dtd" >
<macros>

=A0<<macro
=A0=A0=A0=A0=A0=A0=A0name="findme"
=A0=A0=A0=A0=A0=A0=A0type_ahead_text=""
=A0=A0=A0=A0=A0=A0=A0in_menu="false"
=A0=A0=A0=A0=A0=A0=A0in_toolbar="false"
=A0=A0=A0=A0=A0=A0=A0type_ahead="false"
=A0=A0=A0=A0=A0=A0=A0method_event="on_load"
=A0=A0=A0=A0=A0=A0=A0version="2">

=A0=A0=A0=A0=A0=A0=A0<text><<method>__MACRO_(&quot;<<
method_path/>&quot;)</method><</text>
=A0</macro>

</macros>

then, every time you open a form/object method, you find in your
pasteboard

//projectForm: ?=A2?=82=C5&igrave;Form1"

or

//tableForm: [Table_1];?=A2?=82=C2&ugrave;Form1"

you can paste that in the method editor, highlight it and jump to the
form
editor with command + K?=A2?=82=C2

(from there, you have to locate the object in the property list popup
menu)

Reply to this message

Summary created 4/25/14 at 6:57PM by Intellex Corporation

Comments welcome at: feedback@intellexcorp.com