Currently trying to write my first NETSuite PDF template, and am struggling with so many aspects of it.
I am unable to add an "End Of Page" to my template.
When I click the button, nothing happens.
I have tried...
Examining default templates in which I can add pages, and identifying the code change associated with the change. I could not find any change.
Creating a brand new template, and trying to add a new page. I was not able to.
"End of Page" just inserts a page break - <pbr />.
You can switch to Source Code view to see exactly where it's inserted, and usually it's not where you want if you're using the WYSIWYG editor. So you can move or manually enter the <pbr /> in the correct place in the Source Code editor instead.
I have an old visual prolog project in which I have to change the text of a menu during runtime.
This is what I've done to change the text:
menu_setText(Win, id_menu, NewMenuText)
This works fine, however, when I want to enable/disable this menu, the following does not work (meaning the menu item doesn't change its state):
menu_Enable(Win, id_menu, b_true)
After some search, I found that:
Under MS-Windows, submenus can not be referred to by a resource identifier. If the menu entry for a submenu, needs to enabled, disabled, checked or have the text changed. it is necessary to use a special versions of the menu_Enable, menu_Check and menu_SetText predicates, which specify the text of the menu entry instead of the constant.
menu_Enable(WinHandle, String, BOOLEAN)
menu_Check(WinHandle, String, BOOLEAN)
menu_SetText(WinHandle, String, NewString)
The weird thing is that in my case, menu_setText works just fine with the constant where menu_Enable requires the text itself. (yes I tested menu_Enable with the initial text of the menu item, but when the text changes then everything breaks)
Here comes my question:
How can I enable/disable a menu when I know its ID but not its name ?
If not possible directly, how can I get the current name of a menu when I know its ID ?
In case this helps, this project is opened and compiled with VIP52 (since before the year 2001).
I finally found a workaround that solves my problem, but I'm still not really satisfied, so if anyone comes up with a better answer, I'll take it !
I declared:
txt_menu(menu_tag,string)
And then called:
txt_menu(id_menu, MenuText),
menu_setText(Win, MenuText, NewText),
retractAll(txt_menu(id_menu,_)),
assert(txt_menu(id_menu,NewText)),
menu_Update(Win)
whenever I have to change the text of a menu item, and this can easily be transformed into a menu_setTextById predicate as such:
menu_setTextById(Win, MenuId, NewText):-
txt_menu(MenuId, MenuText),
menu_setText(Win, MenuText, NewText),
retractAll(txt_menu(MenuId,_)),
assert(txt_menu(MenuId, NewText)),
menu_Update(Win).
with the usage:
menu_setTextById(Win, id_menu, "My new text menu").
Noted that if I ever have the need to have several windows with menus, I'll have to add the Window Id to my txt_menu clause.
The main problem with this workaround is that I can't use & in the new text menu because if my menu has "&Menu" as text (meaning that M will be underlined), then trying to use menu_setText(Win,"&Menu","New Menu") will break because "&Menu" is not found.
So I'd need to remove any ampersand from the string before trying to use it in such predicates.
I want to create button to another stack with code
I have two stack.And Stacks name is "AA" and "BB"
I want to create button in stack "BB" from stack "AA" with my code
on createDigits
create button "test" of stack "BB"
end createDigits
Results: It's create in stack name "AA" and this error message:
Here's one way to do what you want:
on createDigits
set the defaultStack to "BB"
create button "test"
end createDigits
What Mark said.
The "create" command only works on the current card. You therefore have to navigate to that card in order to use the command. Mark used the "defaultStack" command to navigate to the target stack. You could also:
lock screen.
go stack "BB".
create button "test".
go back
That sort of thing.
Craig Newman
I want to create the same dialog as the one created when using Dialogs.showException(), but instead of showing the stacktrace, I want to show my custom pre-formatted text. The functionality that I want is the Details button behavior.
What I want is this:
But not with the printed stacktrace.
What I have tried is to create my own Throwable, populate it with StackTraceElement objects(filled with the the text that I need) and overwrite the getStackTrace() method to return the populated array. The problem is that the stack trace is displayed from the point where the exception is thrown so the text that I need is shown at the bottom of the expanded pane.
ControlsFX is an open source project.
The source of the Exception Dialog is available here. I'm a ControlsFX committer, so ping me if you need more information.
Is there a hook or preprocess function that I can access to write my own theming function for a drupal menu (in this case, primary links)?
I have a rather complex menu structure that requires a little extra markup than I'm currently getting by just rendering the menu items in a block (involving sub-menus with a little custom markup) and really need to get access to build the menu's content variable myself, ideally from an array that has all the primary links and their children in scope.
While it may not be the best solution, it is one that worked quite quickly and painlessly:
Drupal keeps a cached version of all your menus in the cache_menu table, I ran a this query to retreive a serialized string containing all the contents of the menu:
SELECT data FROM menu_cache WHERE serialized = 1 AND cid LIKE 'links:primary_links:%';
Substitute primary_links for whatever the name of your menu is and call unserialize on $row->data to get a structured array of everything you should need to build a custom menu.
I call a function in hook_preprocess_block that swaps the content of the menu block with my own and everything seems to be working fine.