(.) frame.test frame-2.5

Posted by ania.pawelczyk on Jul 03, 2008 @ 02:57PM UTC

Problem:
test scrollbar-3.42 fails under windows.
Questions
How to figure out in tcl if a definition was made during the compilation?
Add another constraint?

Explenation
This frame.test is only analyzing the platform

if {$tcl_platform(platform) == "windows"} {
test frame-2.5 {toplevel configuration options} {
catch {destroy .t}
toplevel .t -width 200 -height 100
wm geometry .t +0+0
list [catch {.t configure -use 0x44022} msg] $msg [.t configure -use]
} {1 {window "0x44022" doesn't exist} {-use use Use {} {}}}
} else {
test frame-2.5 {toplevel configuration options} {
catch {destroy .t}
toplevel .t -width 200 -height 100
wm geometry .t +0+0
list [catch {.t configure -use 0x44022} msg] $msg [.t configure -use]
} {1 {can't modify -use option after widget is created} {-use use Use {} {}}}
}

while in tkFrame.c there is only definition checked

/*
* Don't allow the options -class, -colormap, -container, -screen,
* -use, or -visual to be changed.
*/
// line 775
#ifdef SUPPORT_CONFIG_EMBEDDED
if (c == 'u') { //this checks if -use is changed
const char *string = Tcl_GetString(objv[i+1]);
if (TkpUseWindow(interp, framePtr->tkwin,
string) != TCL_OK) {
result = TCL_ERROR;
goto done;
}
} else {
Tcl_AppendResult(interp, "can't modify ", arg,
" option after widget is created", NULL);
result = TCL_ERROR;
goto done;
}
#else
Tcl_AppendResult(interp, "can't modify ", arg,
" option after widget is created", NULL);
result = TCL_ERROR;
goto done;
#endif

When compiling Tcl under Windows by Msys + Mingw, there's created Makefile that doesn't contain SUPPORT_CONFIG_EMBEDDED definition (in contrary to Makefile.vc and Makefile.bc).

I didn't manage to find how to figure out if a definition was made during the compilation.
Moreover, as those compilations differ, should detecting the way of windows compilation be add as another constraint?

 

Replies

  • Reply Re: (.) frame.test frame-2.5

    Anonymous on Jul 10, 2008 @ 09:50PM UTC

    Do not be concerned with frame embedding at this time. There are many other pieces to chew off first. Frame embedding is part of native window handling and in particular also enables the Tcl plugin (http://plugin.tcl.tk/) to function correctly (this embeds Tcl/Tk into IE and Firefox). Once upon a time this was not possible on Windows without strict constraints. I believe that Chengye Mao did significant work in this area for 8.5. In fact, I have to revert some of the changes for the Tcl plugin to work again, but haven't gotten around to that.

  • Reply Re: (?) frame.test frame-2.5

    ania.pawelczyk on Jul 05, 2008 @ 10:59PM UTC

    Donal K. Fellows answered me:
    [...] that particular test needs to see something that's different
    between msys builds and VC++/BC builds. Arguably, that's a configuration
    bug. Something odd going on here.

    --- My doubt solved out.

-->