if have a problem with my Borland C++ 6 and a form.
In my project I have a list of members of a group that are inserted into a TComboBox. So far so good. Now I want to access the objects inside when I change the entry in this TComboBox. Now here's the problem:
Box1->Items->Strings[Box1->ItemIndex] returns the string of the person I chose. But when I want to access the Objects inside Box1 with
Box1->Items->Objects[Box1->ItemIndex] this will always return NULL...
In the last versions of the project it worked well. I tripple checked every object, every SQL everything I could think of. But nothing changed in context to the TComboBox so that this will return nothing anymore like it did before...
Do you guys have an idea what could possibly go wrong here?...
Related
I'm new to MPS, so this may be a stupid question, but I can't find a solution anywhere.
I'm defining two DSLs, where the first one is going to depend on the second.
I've defined a portion of the first language and so far so good.
I have a bunch of Concepts going, some Editors, Constraints etc.
I've created a model with an example node where I view what I've made.
Now I'm working on the second language and I went about exactly the same way as with the first.
I created a Concept that can be root. It's called 'Module'.
Then I defined an Interface Concept, called 'IModuleContent' and gave it to 'Module' as a child, calling it 'content' and setting the cardinality to [0..n].
Then I defined another Concept called 'Interface' that inherits from 'IModuleContent'.
I gave the two Concepts Editors, which are basically just curly brackets for now.
In my example model I create a new node from my new language. It gives me my root, a 'Module'. Because it's a named concept I give it a name. Then, inside the module's curly brackets I declare a new 'Interface'.
Together, it looks like this:
Module printeri {
Interface printer {
}
}
This all pretty much works, except that after giving 'Module' an instance of 'Interface' (so 'printer') as a variable, it gets underlined in red and the error reads:
"Child in the role Module.content does not belong to the concept Module"
However, I'm pretty sure that it does. All the concepts are in the structure of the new language and I believe everything is inherited the right way. I did practically the same thing in my first language and that works fine.
What's going on here?
EDIT: should have specified that I'm on version 2020.3
you can goto "File -> Invalidate Caches and Restart" if you think MPS behaves strange.
For me it looks like you did some changes, e.g. creating the "Module" node in youre examples and then change the structure like removing "content"-child and re-adding it. The problem here is that MPS does not resolves id-based and not name-based. By removing and re-adding a member definition you change the id. MPS is able to handle such changes in to a certain degree, e.g. by just pressing "F5" to refresh the editor. You can also click on the node and open the intentions menu via "ALT+ENTER" investigate the options suggested there.
Hope this background knowledge helps you a little bit with future problems :)
Best regards
Heiko
there seems to be a bug in the comment feature here, hi removes the "Hi Noah"
Okay, so it seems that the error has magically disappeared overnight.
Yesterday I closed MPS for the day and opened it again this morning.
Code completion wasn't working. Very annoying. So I restarted MPS.
On the second try code completion was working and the error from before was gone.
It seems like MPS may be a little unstable.
So yeah, for anyone running into the same issue:
Try the good old 'turn it off and on again' method.
I'm trying the debug function in Oracle Sql Developer 18.4, it looks fine until I ran into some complicate cases, one of them is, it seems I cannot view package_b.some_variable while I'm inside package_a.
See above screen, I'm currently break in package_a, which populate data into package_b (pk_DatVerify.g_model_boc and pk_DatVerify.g_model_boc_count), but the "Watches" window is not able to display any of them.
Is there any way I can see the variable value in pk_DatVerify.g_model_boc at that moment? Even if I have to manually type "dbms_output.put_line" somewhere (like in a command window), it will be much helpful!
Not really critical question, but i'm curious
I am working on a form and sometimes the generated function name is /1BCDWB/SF00000473, and sometimes /1BCDWB/SF00000472. This goes back and forth.
Does anyone know what's the idea behind this? Cuz i'm quite sure it's not a bug (or i might be wrong on that).
It is not a bug. You always have to use SSF_FUNCTION_MODULE_NAME to determine the actual function module name and call it dynamically using CALL FUNCTION l_function_module.
Smartform FMs are tracked by internal numbering and thats saved in the table STXFADMI. You would always notice the different number in Development System if you have deleted any existing Form. Similarly, you would also notice the different number in your Quality system based on the sequence the forms are imported in QAS and the forms as well (as test forms are not migrated to QAS.
Similar behavior is also true for Adobe Form generated FMs.
You need to understand that every smartform has a different interface and hence the automatically generated function module needs to have different import parameters.
Due to this reason the 'SSF*' FMs generate a FM specific for your smartform. The name of the 'generated' FM changes when you migrate from one system to another. And that's the reason why you should use a variable while calling the 'generated' fm and not hardcode it.
The same goes with Adobe form as someone has rightly said in this thread.
We are trying to access the SaveFormat property of a Microsoft.Office.Interop.Word.Document instance (I guess it's technically a DocumentClass instance since Document is an interface). Upon attempting to read SaveFormat, Word crashes rather ungracefully. Wrapping the access in a try..catch block is no good, either; control is getting passed to another assembly which decides to terminate the app rather than throwing the exception for me to re-catch.
This occurs whether I'm simply reading the property in code, like this:
WdSaveFormat saveFormat = this.document.SaveFormat; // document is a Microsoft.Office.Interop.Word.Document
Or when I access the property in a Watch using the debugger.
I suspect the document instance itself is fine; its other properties (e.g., Path) can be reflected on. Running a quickwatch on the document object yields legitimate-looking values rather than a bunch of red-flag-raising "could not evaluate", "null", etc. values. I can scroll down line-by-line in the Quickwatch window and once it gets to SaveFormat it blows up.
The crash occurs in Word 2007 as well as Word 2010.
I've tried both embedding the PIA types and not embedding them ("Embed Interop Types" flag in reference properties)
I've tried referencing the Word 2007 PIAs instead of the 2010 versions. Same behavior.
We're targeting .NET 4.0 in our projects, but I've also tried targeting 3.5. No change.
Any ideas? About to defenestrate my comp :)
It turns out the document was a zero-byte file. Our bad, but it would have been nice had Word thrown a helpful exception (similar to what happens when you try accessing Application.ActiveDocument with no document open) rather than just blow up. Oh well, grand mystery solved. :) Thanks 0xA3 for suggestion that maybe the document itself was the issue. Ever get on one track of thinking and forget to look at the obvious?
I have a custom node type for which I want to have a field that uses a special combobox based on list_text. When one chooses the type list_text it is normally possible to enter a static list of selectable texts, however, I want this list to be dynamic, i.e. based on the results of a db_query. What is the best way to do this using Drupal 7?
A simple example for clarification: A node of this custom type X contains a field that points to another node, so whenever a node of type X is created I want a combobox that contains all other nodes.
(Best solution would be to only display the combobox during node creation, and no longer during edit. But I could also live with it if the combobox was shown during the edit as well.)
I have tried to customize options_select by defining my own data type and implementing hook_options_list accordingly. The combobox was displayed during creation with the correct values, however, I could not save it.. I have no idea what went wrong there, but on the first submit it would change to a different theme, and when I tried again I got an internal server error. Am I on the right track at all with defining a completely new data type for the field? there surely must be a simpler way?
You're right in that you don't need a new datatype. Here's a good tutorial on how to do this. It's not specifically for D7 but I didn't see much that wasn't still applicable. There may be a better way to do it in D7 specifically but I would love to know it too if so :)
The tutorial linked by allegroconmolto sent me on the right way. Thanks for that.
Here's the simpler way of doing it: tutorial
Basically, it is, as I assumed, a common problem and hence a simple solution for it was included in the webform module by now. It provides a hook_webform_select_options_info which can be used to register a callback method. The callback method is then called each time a corresponding option select of a webform is shown, so that you can easily fill it with the results of a dbquery or anything else. Works like a charm and takes next to no time to implement.