I am struggling trying to get the 4D Write-Like Toolbar to work…
http://download.4d.com/4DBlog/Tips/4DWriteLikeToolbarDemo.zip
I am trying to create a transition from 4D Write to 4D Write Pro so I have
added a second page to the input from and moved the 4D Write area to the this
new second page. On the first page I have put the 4D Write Pro area and the
Write-Like sub form. To make it simple I have named the 4D Write Pro the same
name used in the Write-Like Demo... WP_WriteProArea
I am working in my templates table. When an existing template record is opened,
in the on load event of the input form, I am initializing …
C_OBJECT(WP_Information;WP_WriteProArea)
WP_WriteProArea:=WP New("")
WP_Information:=New object("IsNewDocument";True)
WP_Information.DocumentInfo:=New
object("FilePath";"";"Modification";False)
FORM GOTO PAGE(2)
In the demo all of the above is done before the form is opened. When the form
is opened in the On Load phase of the main window, the window title is set as
is the focus set to the 4D Write Pro area. Nothing more in the main window.
That leaves the sub form On load event. Just to make sure that the subform is
working, I would normally to to page 2, but I am leaving the user on page 1 and
have confirmed that all of the On Load code has run in the subform. At this
point the 4D Write Pro area is blank, exactly like it is in the Demo.
The problem is that unlike the demo, nearly all of the menu items in the
subform are disabled.
The load document icon works, so I loaded a wp4 document from disk. That
worked. If I select some text, then select a font from the font popup list, 4D
throws an error on this line…
$wpRange:=WP Get selection(WP_WriteProArea) //“form object not found
or form object is not a 4D Write Pro Form Object"
This is in the method GetSelectionInfo which I have not touched.
The only difference that I can see between what I have done and what is in the
demo is that I have ca;lled WP_WriteProArea:=WP New("") in the on load phase of
the input form and the demo calls it before the form is opened. I hope that is
not the problem.
Any help would be greatly appreciated.
John
John Baughman
1331 Auwaiku Street
Kailua, Hawaii 96734
(808) 262-0328
[email protected]
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************