background image
C H A P T E R 4
NewtApp Applications
4-22
Using NewtApp
You should create a text file, which you save as
Install&Remove.f
, into which
to copy the functions:
InstallScript := func(partFrame)
begin
partFrame.removeFrame :=
(partFrame.theForm):NewtInstallScript(partFrame.theForm);
end;
RemoveScript := func(partFrame)
begin
(partFrame.removeFrame):NewtRemoveScript(removeFrame);
end;
This file should be the last one processed when your application is built. (In NTK
this means that it should appear at the bottom of the Project file list.)
If you have included the stationery files built in Chapter 5, "Stationery," you may
now build, download, and run your NewtApp application.
Using Slot Views in Non-NewtApp Applications
4
The NewtApp slot view protos have a lot of functionality built into them which you
may want to use in a non-NewtApp application. You can do this by keeping your
existing application base view, removing the existing entry view layer and its
contents, replacing it with a
newtFalseEntryView
proto, and placing the slot
views in the
newtFalseEntryView
.
The following requirements must be satisfied for slot views to work outside a
NewtApp application:
The parent of the
newtFalseEntryView
must have the following slots:
target
targetView
The slot views must be contained in a
newtFalseEntryView
proto.
The
newtFalseEntryView
must receive a
Retarget
message whenever
entries are changed.
Modifying the Base View
4
This discussion assumes that you already have a base view set up as part of your
NTK project and that a
newtFalseEntryView
will be added to it later. If that is
the case, you already have slots set with specifications for a soup name, soup
indices, a soup query, and a soup cursor (among numerous others.)
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна