In the event anyone else is trying to spawn a dialog via invocation/reflection (probably no one ever, only I find myself in these situations), the game apparently doesn't like this (if you set it to pause the simulator which all twallan dialogs are). You get:
<!-- ws:start:WikiTextCodeRule:0:
<pre class="text">System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NotSupportedException: Attempting to yield in a non-yielding context!<br/>#0: 0x00043 sim_sleep in Sims3.UI.Sims3.UI.ModalDialog:Pause () ()<br/>#1: 0x000ad callvirt in Sims3.UI.Sims3.UI.ModalDialog:StartModal (bool) (3DCC8E40 [1] )<br/>#2: 0x00002 callvirt in Sims3.UI.Sims3.UI.ModalDialog:StartModal () </pre>
-->
<style type="text/css"><!--
/**
* GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
* (http://qbnz.com/highlighter/ and http://geshi.org/)
*/
.text {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }
-->
</style><pre class="text">System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NotSupportedException: Attempting to yield in a non-yielding context!
#0: 0x00043 sim_sleep in Sims3.UI.Sims3.UI.ModalDialog:Pause () ()
#1: 0x000ad callvirt in Sims3.UI.Sims3.UI.ModalDialog:StartModal (bool) (3DCC8E40 [1] )
#2: 0x00002 callvirt in Sims3.UI.Sims3.UI.ModalDialog:StartModal () </pre>
Because the simulator cannot yield a task that is coming in via reflection.
Rather than you banging your head for 2 days like I've been doing, here's the solution: use a delayed alarm to spawn it. Invoke a function that sets the alarm and then make the alarm spawn the dialog. Solved. You're welcome.
This finding brought to you by many hours of trying to get filterable mods to spawn MC's filter dialog.
Creating an NRaas project Spawning a dialog via reflection
Talk nerdy to us here.
- Chain_Reaction
- Site Admin
- Reactions:
- Posts: 7568
- Joined: December 30th, 2011, 6:00 pm
-
Answers: 81
- Contact:
Chain_Reaction
1 post
• Page 1 of 1
- Share on Facebook
- Share on Twitter
- Share on Tuenti
- Share on Digg
- Share on Reddit
- Share on Delicious
- Share on VK
- Share on Tumblr
Return to “Developer Discussion”
Jump to
- NRaas Core
- ↳ Announcements
- ↳ Site Help And Feedback
- ↳ Chatterbox
- NRaas Mods
- ↳ Installation And Mod Updater Help
- ↳ Careers Discussion
- ↳ Careers Tracker
- ↳ ErrorTrap Discussion
- ↳ ErrorTrap Tracker
- ↳ GoHere Discussion
- ↳ GoHere Tracker
- ↳ MasterController Discussion
- ↳ MasterController Tracker
- ↳ Overwatch Discussion
- ↳ Overwatch Tracker
- ↳ Register Discussion
- ↳ Register Tracker
- ↳ Retuner Discussion
- ↳ Retuner Tracker
- ↳ StoryProgression Discussion
- ↳ StoryProgression Tracker
- ↳ Traveler Discussion
- ↳ Traveler Tracker
- ↳ Woohooer Discussion
- ↳ Woohooer Tracker
- ↳ Other NRaas Mods
- ↳ Apartment Mod Tracker
- ↳ Business As Unusual Bistro Tracker
- ↳ Consigner Tracker
- ↳ Cupcake Tracker
- ↳ Dreamer Tracker
- ↳ Dresser Tracker
- ↳ Hybrid Tracker
- ↳ Misc Tracker
- ↳ Mover Tracker
- ↳ No Fridge Shopping Tracker
- ↳ Porter Tracker
- ↳ PortraitPanel Tracker
- ↳ Produce Stand Tracker
- ↳ RelationshipPanel Tracker
- ↳ Relativity Tracker
- ↳ Shop From Inventory Tracker
- ↳ Tagger Tracker
- ↳ Tax Collector Tracker
- ↳ Tempest Tracker
- ↳ The Savvier Seller Tracker
- ↳ Vector Tracker
- NRaas Development
- ↳ Developer Discussion
- ↳ Localization Discussion
- ↳ Testing Mods Discussion
NRaas Nav
- MOD UPDATES
- Update History
- Update History Testing
- Mod Updater
- DISCUSSION
- Chatterbox
- HELP / FAQs
- Mod Docs / FAQs
- Where Can I Find?
- Gameplay FAQs and Tips
- Tips For Better Game Performance
- OTHER UPDATES
- Recent Changes
- Twallan's Archives and Tributes
- DESIGN DISCUSSION / TUTORIALS
- Creating an NRaas Project
- TRANSLATIONS
- How To Translate
- Localization Pages
MODS | VERSION |
---|---|
Animator | 10 |
AntiMagicScroll | 9 |
Careers | 86 |
Consigner | 22 |
Cupcake | 5 |
DebugEnabler | 54 |
Decensor | 14 |
Dreamer | 15 |
Dresser | 38 |
ErrorTrap | 100 |
GoHere | 43 |
HomeOpener | 11 |
Hybrid | 9 |
MasterController | 133 |
Mover | 28 |
NoCD | 1 |
OnceRead | 13 |
Overwatch | 121 |
Packer (editor) | 7 |
PocketProtector | 2 |
Porter | 42 |
PortraitPanel | 33 |
Register | 80 |
Relativity | 23 |
RelationshipPanel | 20 |
Retuner | 10 |
Saver | 21 |
SecondImage | 5 |
Selector | 13 |
Shooless | 18 |
SleepFreedom | 21 |
StoryProgression | 267 |
Tagger | 3 |
Tempest | 15 |
Traffic | 21 |
Traveler | 86 |
UntranslatedKey | 1.67 |
Vector | 19 |
Woohooer | 129 |
WrittenWord | 10 |