[LDTP-Dev] setappmap is not working (NameError: name 'setappmap'
is not defined()
Mauricio Lin
mauriciolin at gmail.com
Mon Nov 14 21:27:40 PST 2005
Hi Premkumar,
On 11/11/05, Premkumar Jothimani <prem.jothimani at gmail.com> wrote:
>
> Hi Mauricio,
>
> I got the point. But I am puzzled as why setcontext does not work (!!?!).
>
> Also I am worried that you will have to send the
> advanced-linux-programming.pdf file along with your map file for things to
> work as your map file expects that file to be opened initially. I dont think
> it is such a good idea. An alternative solution would be to generate the map
> file with none of the files open and use remap() at runtime. This would make
> the map file look logical and simple.
The problem is if you generate a map file (first map file) from a gpdf with
no files loaded, gpdf does not display many widgets (buttons, menus) and
then map file does not contain these widgets names.
By other hand, if you generate a map file (second map file) from a gdpf with
a file loaded as for instance advanced-linux-programming.pdf, your map file
probably will contain more widgets.
So the two map files are not so similar, since there are more widgets names
presented on the second map file.
If I remap at runtime I have to know in advance the name of widgets that are
not presented on the first map file, right?
How can I know these widgets names in advance if the first map file does not
present them?
Try to generate 2 map files, the first one just open the gpdf and appmap the
application and the last one open gpdf with some pdf file and appmap the
application. Compare these 2 map files and you can check they are different.
I checked the remap function description, but how can I access dynamically
created widgets if I do not know their names in advance?
BR,
Mauricio Lin.
Regards
> Premkumar
>
>
> On 11/10/05, Mauricio Lin <mauriciolin at gmail.com> wrote:
> >
> > Hi Premkumar,
> >
> > On 11/10/05, Premkumar Jothimani < prem.jothimani at gmail.com> wrote:
> > >
> > > Hi Mauricio,
> > >
> > > Assuming that you use the map file that you sent me, I think your
> > > setcontext() call should look like
> > > setcontext ('PDF Viewer', 'python.pdf')
> > > The point to note here is that the first parameter should always be
> > > the value of the "label" field for that window name in the map file.
> >
> >
> > OK. But there is a small detail here. The map file I generated starts
> > as:
> >
> > [frmadvanced-linux-programming]
> >
> > frmadvanced-linux-programming={class=frame,parent=gpdf,child_index=0,label=
> > advanced-linux-programming.pdf}
> > ...
> >
> > Look the label field, it is not 'PDF Viewer'. The 'PDF Viewer' just
> > exists if you generated a map file from a gpdf with no pdf file loaded.
> > This map file was generated based on an open pdf file in the gpdf
> > window.
> >
> > The reason I am generating the map file in this way is because a gpdf
> > application with a pdf file loaded displays more graphical components
> > (buttons, menu, menu options) that I want to manipulate.
> >
> > You can check that when you open a pdf file in gpdf, more buttons are
> > displayed as well as more options in menu are created.
> > Open the gpd application and afterward open a pdf file, you can notice
> > that more buttons and menu options are displayed.
> >
> > BR,
> >
> > Mauricio Lin.
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/ldtp-dev/attachments/20051115/b8f1a5cf/attachment.html
More information about the LDTP-dev
mailing list