Wheelhouse®
Shopping Cart
QuickBooks Online Integration
QuickBooks Online Integration Setup and Troubleshooting
QuickBooks Online (QBO) Integration Overview
Custom Fields and Forms
System Administration
Troubleshooting Checklist
Document Auto Number Format
Sale Shipment Records and Tracking Information Emails
Peripherals and Equipment Requirements
Navigation and Definitions
Logging In and Getting Started
Understanding Order Flow in Wheelhouse
Document Categories
Understanding People and Organizations in Wheelhouse
Admin List Views and Single Record Views
Left Menu Navigation
Advanced Search Techniques
User Administration
User Management: Adding, Editing, and Revoking Access
Defining or Adjusting Teams
User Profiles and Roles in Wheelhouse
Choosing a User Profile
Understanding Wheelhouse Login Types
Reports, Import, Exports, and Document Templates
Report Manager Guide
How to Modify Document Templates
Preparing Excel and Word Templates for Data Merge
Running Reports
Creating Reports on Quotes, Sales, and Outside Reps
Exporting to Excel
Quality Mangement
Adding QCIR Templates
QC Non Conformance Reports (NCRs)
Adding Quality Control Inspection Records (QCIR) in Shop Work
Order Management
Using Order Flags and the Flag First Configs Option
Order Management Guide
Creating customers, quotes and sales
Adding Dealer and Outside Rep Logins
Closing a Sale
External Agent Access Levels
Printing and Emailing Quotes and Sales
Production Routing and Tracking
Shop Work and QR Scanning
Merge Line Items at a Certain Step (Stash & Merge Functionality)
Bin Locations
Shop Work: Priority Flags and Fixed Position
Stopping Work Center or All Running Operations at the End of the Shift
Shop Work
Viewing/Adding/Resolving Work Order Issues
Production Scheduling
Job Manager Guide: Creating Jobs and Work Orders
Workflow Guide: Completing Work Order Operations
The Gantt View
Job Scheduler
Labor Routings
Production Definitions
External Connections - API
Items and Configurators
Product Configuration in Wheelhouse
Item Types
Build Types
Item Overrides: Name, Pricing, and Discounts
Public Item Selector AKA Public Display Categories
Deploying A Configurator to Another Environment
Item and BOM Import Action
Wheelhouse Change Log
Introduction to Kanban Inventory Management
Setting Up Inventory Replenishment and Purchasing
Inventory Hub Guide
Can I use Wheelhouse as my CRM?
Table of Contents
Dino Script® Language Reference
Appendix A: Trestle®/Dino Script® Integration
A: Returning JSON Data
A: Host and Target
A: Running SQL Queries
A: Table of Contents
A: Commands
A: Dynamic and DynamicProxy
A: Advanced Command Arguments
A: Introduction
A: Files
A: Direct Links - URLs and Downloads
A: NPOI and Excel, DocX and Word
A: Embedded Apps with MS Access Files
A: Command Arguments
Style Guidelines
Adding New Functionality with Dino Script XCommand™
Introduction
Dino Script™ Table of Contents
Operators
Concepts
Syntax
Expression Types
Keywords
Variables
Blocks and Scopes
Built-In Functions
Custom Functions (defs)
Anonymous Functions
Conditional Statements
The Context Object
FAQ
Dino Cookbook
Sandbox In-Depth
Functions as Delegates
Native Types
Aliasing
Other Dino Scripts
- All Categories
- Dino Script® Language Reference
- Functions as Delegates
Functions as Delegates
As outlined above, functions are often passed to other functions, either within Dino itself or back to the host language, as callbacks. Because Dino is a dynamically-typed language, the host language…
As outlined above, functions are often passed to other functions, either within Dino itself or back to the host language, as callbacks. Because Dino is a dynamically-typed language, the host language sometimes needs a little guidance about the signature of the Dino function.
What does “dynamically-typed” mean? Well, in simplest terms, it means that Dino considers everything a simple “object”. You may have noticed that you don’t declare a type when you set a Dino variable or define a function. This differs from the statically-typed nature of the host framework.
In Host Framework
public int add(int a, int b) {
return a + b;
}
var value = add(3, 4); // ok
var sv = add('one', 'two'); // error, will not compileIn Dino Script
def add(a, b){
return a + b;
}
var value = add(3, 4); // ok
var sv = add('one', 'two'); // also ok, returns 'onetwo'Notice that in the host language, the add method declares a return type (int), and each parameter declares a parameter type (both int in this case). This means that when we attempt to call the add method with string values, the host language compiler will complain.
In Dino, by contrast, we omit any return type information, and parameters are simply identifiers like a and b. This allows calling the add function in Dino with whatever arguments we like – the expression evaluator will just try to add them together, no matter what the “type” of the arguments may be.
This all sounds peachy – we don’t need to bother with type information. And usually, that turns out to be correct. There are, however, some edge cases that cause problems when you pass a Dino function into a native function as a callback.
What is a Delegate?
This section will get a bit dense with terminology and programming concepts. If you don’t care about the underlying reason and just want to know how to make it work, feel free to skip to the next section.
In the native framework, a delegate is a piece of code that defines the signature of a function, but does not provide implementation details. Here is the full definition of a delegate:
public delegate TResult Func<in T1, in T2, out TResult>(T1 arg1, T2 arg2);Let’s break that down. TResult is the type that will be returned by a method that matches the signature of this delegate. T1 is the type of the first argument, T2 is the type of the second argument. Here is a method that happens to match the signature of that delegate – hey, it looks familiar!
// we have a return type (TResult, int)
// we have a param type (T1, int)
// we have another param type (T2, int)
public int add(int a, int b)
{
return a + b;
}Because this method (with its implementation details) matches the signature of our delegate, it can be supplied as a “replacement” (thus the name “delegate”) wherever another function wants a callback of that delegate type.
// add any two things together, and let the delegated function do the actual work
public TResult addAnything(Func<T1, T2, TResult> adder, T1 arg1,l T2 arg2)
{
// call the delegate that was passed in
return adder(arg1, arg2);
}So, What's the Problem?
We'll be expanding the documentation in this section soon. Please contact us if you have questions.
What's the Workaround?
We'll be expanding the documentation in this section soon. Please contact us if you have questions.
How did we do?
Sandbox In-Depth
Native Types