Questions tagged [host-object]

A host object is an interface which allows a user to interact with an application via transient code and data.

Host objects enable custom functions and data to be defined dynamically for the duration of a the host. They are used to facilitate the implementation of custom or context-specific functionality.

References

15 questions
6
votes
1 answer

Access Host object from T4 class

When I try to access the Host object from a non-static method declared in <#+#> brackets, everything works ok. But I need to access it from a class method, like this: <#+ public class ProjectTraverser { public void Traverse() { var a…
Narek Malkhasyan
  • 1,332
  • 1
  • 12
  • 22
3
votes
1 answer

Returning a host object in Rhino

What is the best way to return an host object to JavaScript in Rhino? I have two classes like this: public class Hosted extends org.mozilla.javascript.ScriptableObject { private static final long serialVersionUID = 1; public Hosted() {} …
Matthew Crumley
  • 101,441
  • 24
  • 103
  • 129
3
votes
1 answer

Is it possible to show only User Defined Functions & Properties in Google Chrome's console?

In Firebug you can set the output of the DOM tab to only show user defined functions and properties. This is helpful for checking if you have objects escaping into the global namespace. Is there an equivalent in Chrome?
2
votes
2 answers

Objective-C Blocks with closure that references the host object

I've been playing with blocks and encountered a weird behavior. This is the interface/implementation, which just holds a block with the ability to execute it: @interface TestClass : NSObject { #if NS_BLOCKS_AVAILABLE void…
elado
  • 8,510
  • 9
  • 51
  • 60
2
votes
1 answer

Windows Script Host Object Model's Interop.IWshRuntimeLibrary.dll referencing same directory as executable

I have an application that creates desktop shortcuts. To do this I have to reference the Windows Script Host Object Model. When I add it as a reference, it always creates the DLL, Interop.IWshRuntimeLibrary.dll, in the obj\x86\Debug directory,…
Brady
  • 93
  • 1
  • 4
  • 10
2
votes
1 answer

Can x.y and x['y'] ever result in different behavior for Host Objects?

For a normal ("Native") JavaScript objects, where the property name is a valid identifier, the expressions x.y and x["y"] are always semantically equivalent. Is this equivalency guaranteed for Host Objects? [..an] object supplied by the host…
user2864740
  • 60,010
  • 15
  • 145
  • 220
2
votes
2 answers

IE8 Cannot add properties to JavaScript object returned by window

I just came across this odd issue in IE8 and I cannot seem to find any more details about it. Naturally, if I create a JavaScript object, however I do it, I can simply add properties by dynamically defining them: var rect = {}; rect.x = 200; Great.…
Michael Plautz
  • 3,578
  • 4
  • 27
  • 40
1
vote
0 answers

How to access the service instance from host object in WCF?

I am trying to incarnate some sort of ad hoc WCF service. I already managed to launch it and make it call its own web methods as some other guy's methods. The issue that I am facing is instance management. I have set…
user1048677
  • 229
  • 3
  • 13
1
vote
1 answer

How to find all the JavaScript globals in browser code which are not part of the DOM, host objects, etc?

In JavaScript in the browser global variables are stored as members of the window host object. But also in window are all the properties of window which are part of the browser DOM and, if I assume correctly, other global functions and objects which…
hippietrail
  • 15,848
  • 18
  • 99
  • 158
1
vote
1 answer

How do I expose my COM host object to the VSTA add-in?

Does anybody upgraded VSTA 2.0 Add-in development to VSTA 2012? if Yes, Could you please help me on this subject "How do I expose my COM host object to the VSTA add-in?" i am working with VSTA 2012, The sample application which comes with VSTA 2012…
1
vote
1 answer

Cuda host object to device

I am trying to replicate a big class on my cuda device that contains a lot of variables and methods. I have put the class definition into a .cuh file and I am able to create objects and use them in my device code. The question now is, is there any…
Markus S
  • 13
  • 6
0
votes
2 answers

Passing SQLPlus script location using Windows Script Host Object Model in VBA

Ok, So I haz lots of scripts that are generated by a team in my organisation which need to then be processed via SQLPlus Basically we/me get loads of emails with the script location @Z:/aFolder/aScript.sql; We then have to process them…
spences10
  • 570
  • 1
  • 13
  • 32
0
votes
2 answers

How to track a caller for native getters / setters of host objects in a browser?

Here is a use case: Assume we have a web page that has an issue, which results in the page to be scrolled up on a mobile device at some point after DOMContentLoaded has fired. We can legitimately assume there is something, which operates on…
0
votes
1 answer

WPF host object in new thread

Want to host object not in gui thread, all methods of this object will run in this new thread. Something like that: Thread thread = new Thread(() => { MyDataInstance = new…
Jack Malkovich
  • 786
  • 13
  • 33
-1
votes
1 answer

C++: How to find host object from pointer to member variable

Here we have our simple node struct which might be used to implement a double linked list. template struct node { node *prev = NULL; node *next = NULL; T data; }; Supposing we don't know or have reference to a node…
tuk
  • 367
  • 1
  • 4
  • 10